/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : see_doctor.cc
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2021-01-23 init v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
********************************************************************************
*/
#include <cstdio>
#include "see_doctor.h"

#define CDCTR_LOGE(fmt, args...) printf("%d Doctor E: " fmt, __LINE__, ##args)
#define CDCTR_LOG(fmt, args...)  printf(fmt, ##args)

CSeeDoctorTemplate::CSeeDoctorTemplate()
{
    //CDCTR_LOG("Enter SeeDoctorTemplate!\n");
}

CSeeDoctorTemplate::~CSeeDoctorTemplate()
{
    //CDCTR_LOG("Exit SeeDoctorTemplate!\n");
}

// 看病流程
void CSeeDoctorTemplate::StartProcess()
{
    this->ShowHealthCode();
    this->FillTable();
    this->Register();
    this->SeeDoctor();
    this->Pay();
}

// 展示健康码
void CSeeDoctorTemplate::ShowHealthCode()
{
    CDCTR_LOG("Show health code! \n");
}

// 医生面诊
void CSeeDoctorTemplate::SeeDoctor()
{
    CDCTR_LOG("Make a diagnosis by doctor.\n");
}

// 付款
void CSeeDoctorTemplate::Pay()
{
    CDCTR_LOG("Pay the medical bills %0.2f￥.\n", mCost);
}

// ---------------  Stomach  ---------------
CTreatStomach::CTreatStomach()
{
    CDCTR_LOG("-------- Treat Stomach --------\n");
}

CTreatStomach::~CTreatStomach()
{
    //CDCTR_LOG("-------- Finish Treat Stomach --------\n");
}

void CTreatStomach::FillTable()
{
    CDCTR_LOG("Fill table: Stomach.\n");
}

void CTreatStomach::Register()
{
    CDCTR_LOG("Register Internal Medicine.\n");
}

void CTreatStomach::SeeDoctor()
{
    CDCTR_LOG("See physician internist.\n");
    mCost = 230.9;
}

// --------------  Headache   --------------
CTreatHeadache::CTreatHeadache()
{
    CDCTR_LOG("-------- Treat Headache --------\n");
}

CTreatHeadache::~CTreatHeadache()
{
    //CDCTR_LOG("-------- Finish Treat Headache --------\n");
}

void CTreatHeadache::FillTable()
{
    CDCTR_LOG("Fill table: Headache.\n");
}

void CTreatHeadache::Register()
{
    CDCTR_LOG("Register Surgery.\n");
}

void CTreatHeadache::SeeDoctor()
{
    CDCTR_LOG("See surgeon.\n");
    mCost = 82.7;
}







